Configure NIS Client
2015/03/08 |
Configure on NIS clients in order to share users' accounts in your local networks.
|
|
[1] | Install and Configure Ypbind. |
[root@www ~]#
yum -y install ypbind rpcbind # set NIS domain [root@www ~]# ypdomainname srv.world [root@www ~]# echo 'NISDOMAIN=srv.world' >> /etc/sysconfig/network
[root@www ~]#
authconfig \ --enablenis \ --nisdomain=srv.world \ --nisserver=dlp.srv.world \ --update Starting rpcbind: [ OK ] Starting NIS service: [ OK ] Binding NIS service: .[ OK ] # add optionally if you need ( create home directory automatically if it's none )
[root@www ~]#
vi /etc/pam.d/system-auth # add to the end session optional pam_mkhomedir.so skel=/etc/skel umask=077
www.srv.world login:
redhat # NIS user Password: Creating directory '/home/redhat'. [redhat@www ~]$ # just logined
# show nis server [redhat@www ~]$ dlp.srv.world [redhat@www ~]$ ypcat passwd cent:x:500:500::/home/cent:/bin/bash redhat:x:501:501::/home/redhat:/bin/bash # try to change password [redhat@www ~]$
Changing NIS account information for redhat on dlp.srv.world.
The NIS password has been changed on dlp.srv.world.Please enter old password: # current password Changing NIS password for redhat on dlp.srv.world. Please enter new password: # new one Please retype new password: [redhat@www ~]$ # just changed |